<script type="text/javascript">
	$(document).ready(function(){
		$.validator.messages.required = "";
		$.validator.messages.date = "";
		$("#FormSuaNguoiDung").validate();
	});
</script>

<?php
if(isset($_SESSION['QuyenHan']) && $_SESSION['QuyenHan'] == 1)
{
	$MaNguoiDung = $_GET['id'];
	$nguoidung = new nguoidungbs();
	$nguoidung->MaNguoiDung = $MaNguoiDung;
	$danhsach = $nguoidung->GetList();
?>
<h3>Sửa thông tin người dùng</h3>
<form id = "FormSuaNguoiDung" action="index.php?do=nguoidung_sua_xuly" method="post">
	<table class="Form table borderless">
		
		<input type="hidden" value="<?php echo $danhsach[0]['MaNguoiDung']; ?>" name="MaNguoiDung" />
		
		<tr>
        	
			<td>   <div class="form-group form-custom">  <label  for="hoten"> Họ và tên:</label> <div class="input-group"> <input type="text" value="<?php echo $danhsach[0]['TenNguoiDung']; ?>" name="TenNguoiDung" class="form-control required" /> <span class="input-group-addon" >*</span> </div> </div></td>
		</tr>
		<tr>
			<td>  <div class="form-group form-custom">  <label  for="diachi"> Địa chỉ: </label>
             <div class="input-group"> <input class="form-control " type="text" value="<?php echo $danhsach[0]['diaChi']; ?>" name="DiaChi" /> <span class="input-group-addon" >*</span> </div> </div></td>
		</tr>
		<tr>
			<td> <div class="form-group form-custom">  <label  for="email"> Email: </label> <div class="input-group"> <input type="text" value="<?php echo $danhsach[0]['Email']; ?>" name="Email" class="form-control required" /><span class="input-group-addon" >*</span> </div> </div> </td>
		</tr>
		<tr>
			<td> <div class="form-group form-custom"> <label  for="email"> Điện thoại:  </label> <div class="input-group"> <input type="text" value="<?php echo $danhsach[0]['DienThoai']; ?>" name="DienThoai" class="form-control required"/><span class="input-group-addon" >*</span> </div> </div> </td>
		</tr>
	</table>
	<p class="requirefields">(*): Các trường bắt buộc phải nhập.</p>
	<input type="submit" value="Cập nhật" /><br/>
	<a href = "index.php?do=nguoidung">Danh sách</a>
</form>
<?php
}else
{
	ThongBaoLoi("Vui lòng đăng nhập !");
}
?>